import { JSEncrypt } from "jsencrypt";

const keys =
  "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJqgMClwenUidiT1PXh7zLLtcTAh4rRB7r63Z3GjtltYK0wM4GHnyJZCuBhBcegsewJw39jmUcpugPxdEk4353MCAwEAAQ==";

export function myencrypt(word: string) {
  const jsencrypt = new JSEncrypt();
  jsencrypt.setPublicKey(keys);
  const cipher: string | false = jsencrypt.encrypt(word);
  return cipher;
}
export function mydecrypt(word: string) {
  const jsdecrypt = new JSEncrypt();
  jsdecrypt.setPublicKey(keys);
  const cipher: string | false = jsdecrypt.decrypt(word);
  return cipher;
}
